<?php

use Illuminate\Routing\Router;


Route::group([
    'prefix' => 'admin/article',
    'namespace' => 'Frieza\\Modules\\Article\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {

//    $router->get('/area', 'IndexController@area')->name('article.area');
    $router->get('/searchTag', 'IndexController@searchTag')->name('article.tag');


    //预算提示信息
    $router->get('/index', 'ArticleController@index')->name('article.index');
    $router->get('/edit/{aid}', 'ArticleController@edit');
    $router->post('/score', 'ArticleController@score');

    $router->get('/audit/{aid}', 'ArticleController@audit')->name('article.audit');

    //整屋筛选
    $router->get('/select/index', 'ArticleSelectController@index')->name('articleselect.index');
    $router->get('/select/draftlist', 'ArticleSelectController@draftlist')->name('articleselect.draftlist');

    $router->get('/select/audit/{aid}', 'ArticleSelectController@audit')->name('articleselect.audit');
    //存储结果
    $router->post('/select/audit/save', 'ArticleSelectController@auditSave')->name('articleselect.saveaudit');


    //精选
    $router->get('/select/bestForm/{aid}', 'ArticleSelectController@bestForm');
    $router->post('/select/addBest', 'ArticleSelectController@addBest');
    $router->post('/select/delBest/{aid}', 'ArticleSelectController@delBest');
    $router->post('/select/setPrivate/{aid}', 'ArticleSelectController@setPrivate');
    $router->post('/select/del/{aid}', 'ArticleSelectController@del');
    $router->post('/select/reCheck/{aid}', 'ArticleSelectController@reCheck');
    $router->post('/select/recoverPrivateOfArticle/{aid}', 'ArticleSelectController@recoverPrivateOfArticle');
    //下行
    $router->get('/select/sendMsgForm/{aid}', 'ArticleSelectController@sendMsg');
    $router->post('/select/pushMsg','ArticleSelectController@pushMsg');
    // 常用语编辑
    $router->get('/select/normalword/list', 'ArticleSelectController@editNormalWord');
    // 常用语保存
    $router->post('/select/normalword/list/save', 'ArticleSelectController@saveNormalWord');

    $router->get('/select/exportNormarlData', 'ArticleSelectController@exportNormarlData');

    #运营评论和运营点赞
    $router->get('select/comment/{id}', 'ArticleSelectController@addCommentPop');//添加运营评论弹窗
    $router->post('select/comment/{id}/save', 'ArticleSelectController@saveComment');//添加运营评论提交
    $router->get('select/comment/check/{id}', 'ArticleSelectController@checkComment');//校验运营评论
    $router->get('select/comment/{id}/commentaccount', 'ArticleSelectController@commentAccount');//运营评论账号列表
    $router->get('select/comment/{id}/commentaccount/create', 'ArticleSelectController@addCommentAccount');//添加运营评论账号
    $router->post('select/comment/{id}/commentaccount/save', 'ArticleSelectController@commentAccountSubmit');//添加提交
    $router->get('select/like/{id}', 'ArticleSelectController@saveLike');//添加运营点赞
    $router->get('select/copy/{id}','ArticleSelectController@copyUrl');//复制H5链接
    $router->get('select/business/{id}/{type}','ArticleSelectController@editBusiness');
    $router->get('select/displayBusiness/{id}/{type}','ArticleSelectController@displayBusiness');//硬广

    //今日推荐整屋
    $router->get('/todayarticle', 'TodayArticleController@index');
    $router->get('/todayarticle/{year}', 'TodayArticleController@index');
    $router->get('/todayarticle/{year}/{month}', 'TodayArticleController@index');
    //修改预算信息
//    $router->get('/todayarticle/create', 'TodayArticleController@create');
    $router->get('/todayarticle/edit/{show_time}/{id}', 'TodayArticleController@edit');
    //添加、修改预算信息提交
    $router->post('/todayarticle/save', 'TodayArticleController@editSubmit');
    //获取全部
    $router->get('/today', 'TodayArticleController@getAll');
    //下载
    $router->get('/today/exportNormarlData', 'TodayArticleController@exportNormarlData');




    //添加room 信息
    $router->get('/select/setLiveRoom/{aid}', 'ArticleSelectController@setLiveRoom');
    $router->post('/select/addLiveRoom', 'ArticleSelectController@addLiveRoom');

    //整屋列表页
    $router->get('/ArticleList/index','ArticleListController@index');
    $router->get('/ArticleList/copy/{id}','ArticleListController@copyUrl');//复制H5链接


    //轻应用今日推荐整屋
    $router->get('/todayarticlelightapp', 'TodayArticleLightAppController@index');
    $router->get('/todayarticlelightapp/{year}', 'TodayArticleLightAppController@index');
    $router->get('/todayarticlelightapp/{year}/{month}', 'TodayArticleLightAppController@index');
    $router->get('/todayarticlelightapp/edit/{show_time}/{id}', 'TodayArticleLightAppController@edit');
    $router->post('/todayarticlelightapp/save', 'TodayArticleLightAppController@editSubmit');
    $router->get('/todayarticlelightapp', 'TodayArticleLightAppController@getAll');
});
